home *** CD-ROM | disk | FTP | other *** search
- indVesaMode(xsize,ysize,24);
- END;
- IF mode = 0 THEN BEGIN
- WriteLn('No such mode could be found !');
- WriteLn('Switching to to 320x200.');
- ReadKey;
- mode := V320x200x256;
- END;
- END;
-
- begin { program body }
- SelectMode;
- Initialize;
- ReportStatus;
-
- { AspectRatioPlay; }
- FillEllipsePlay;
- SectorPlay;
- WriteModePlay;
-
- ColorPlay;
- { PalettePlay only intended to work on these drivers: }
- if (GraphDriver = EGA) or
- (GraphDriver = EGA64) or
- (GraphDriver = VGA) then
- PalettePlay;
- PutPixelPlay;
- { PutImagePlay; }
- RandBarPlay;
- BarPlay;
- Bar3DPlay;
- ArcPlay;
- CirclePlay;
- PiePlay;
- LineToPlay;
- LineRelPlay;
- { LineStylePlay; }
- { UserLineStylePlay; }
- TextDump;
- TextPlay;
- CrtModePlay;
- FillStylePlay;
- FillPatternPlay;
- PolyPlay;
- SayGoodbye;
- { CloseGraph; }
- CloseVesa;
- end.
- ***************************************************
- '* SHOW D2ROTATE (ABOUT THE ORIGIN)
- '****************************************************************∞╥≤c≤*φè#^│v/╒:j═φ0t+l▓ô"¬"g└≡?%ªêΣ│H╫½╫╜├¿U'╒⌐⌡ ßV?╩¬ujOΦçEZ1∞▐!▄B╛Σ8║æ]1GlNÜ┐q▌▓;ô$ΦzE<cª*bEô#ä╧ñÅ"∩─LrdaÖ╠º╫a^¥£å╬1~)@ëÖMδ╫0═6DäFê¬Çv┼ß╨kæpτ╪É)}ª 1w3╤╧ü⌡¥╓h▓╣≈ïÅaÑ[TⁿHqªÉ╝DKÄ─Y-∞tT╤Θ╨º╟╪.*ÇI9lΦ≈{πτcσ$τπßoFr╪╨∩┼╞╟;O2■e²LÜ4^N|╪½ÅO?╔°FOz`╟╟╟'<>>π$πΘù6·Xgî╖│°oîδπGƒd╝▀░?■╪╔_9L ⌡ôⁿq'æO▀ƒn4╔▀╚▄┼3pτ.òO°·}÷╕ⁿ±'æO?ít│!√8ßÑ≤/┐╣p┼≥┘E╦Vox╕cΦé5╟╚º╙$?√$≥ΘZεsî≡åìΓpKù¢ïß X╥ 9╞≈\µk┤O¥_ 5Üö\≤éÄ┌╤A[╤ÿáï┼éNⁿÅu16 g,%hc╙╨cD╨Vï┘R¢öKñR;8εáΣ╢╪ós╤π╡á└èxgzPÄMú╫yαºÉ+σJ¢i+▓â3╥ ═Ñ╙î^ºG▓█ πér φçs %#(╗⌠?┼%u8≡6+QÉ))ò)Afw≈╣╪)B&4░åLXV:δät@Å.;5Φf╢Ät┐ΣJ╫─U8úÇ╟éö£╕p╔┴⌠vg╨╬╥é÷╪╣┬ΓI.ç≡^v╤ZΦÇ& ╒┌6ñô6Xß Nè╡╬E₧Ñ
- kIº╠▄A+╣╥éb²tæ-Y¡½αÑa═uuîÇ╢αêvhuª╡SÅ┤vèùú¥F;p<d⌐/F─d█éT%▓KΦû=q■öI┐┐╠6S$▒÷╚ENΩ¥Fû9╔┌R'╝ ╧φ└?g┬j▓0═/b╖₧─mûé╢┌»ÿÄë/·<éò■░╤╟╢├Xσ:╥P3Θ"╬Læsφ░┌öSö!╗¿*mN£WΣÇ£┤~#╗ææ≥RΩóh:à▌.æ≈╕▌v£äàd▒à╒├=░╖π║$howeg*╬ 6ù▄ƒô╕φ░Ö╢qΘD>(w@úKεHÆ╛öúΣU
- éÜR╔╤W▄èê 2M%ó.▓SNÖA1ùJE╢║l]▓¿>\%└Å4ßO▄£â⌐& ê/)8vSP▀▓ôⁿææ√ü√ÑÄa⌠â╚4S╓╟P-?Σá╕▓Næ*q╡UΘ▓≈ ^ñ·I.rúR&$Y^╚%è≡B┌≈Ceat
- Color := RandColor;
- SetColor(Color);
- SetFillStyle(Random(CloseDotFill)+1, Color);
- Bar3D(Random(MaxWidth), Random(MaxHeight),
- Random(MaxWidth), Random(MaxHeight), 0, TopOff);
- until KeyPressed;
- WaitToGo;
- end; { RandBarPlay }
-
- procedure ArcPlay;
- { Draw random arcs on the screen }
- var
- MaxRadius : word;
- EndAngle : word;
- ArcInfo : ArcCoordsType;
- begin
- MainWindow('Arc / GetArcCoords demonstration');
- StatusLine('Esc aborts or press a key');
- MaxRadius := MaxY div 10;
- repeat
- SetColor(RandColor);
- EndAngle := Random(360);
- SetLineStyle(SolidLn, 0, NormWidth);
- Arc(Random(MaxX), Random(MaxY), Random(EndAngle), EndAngle, Random(MaxRadius));
- GetArcCoords(ArcInfo);
- with ArcInfo do
- begin
- Line(X, Y, XStart, YStart);
- Line(X, Y, Xend, Yend);
- end;
- until KeyPressed;
- WaitToGo;
- end; { ArcPlay }
-
- procedure PutPixelPlay;
- { Demonstrate the PutPixel and GetPixel commands }
- const
- Seed = 1962; { A seed for the random number generator }
- NumPts = 2000; { The number of pixels plotted }
- Esc = #27;
- var
- I : word;
- X, Y, Color : word;
- XMax, YMax : integer;
- ViewInfo : ViewPortType;
- begin
- MainWindow('PutPixel / GetPixel demonstration');
- StatusLine('Esc aborts or press a key...');
-
- GetViewSettings(ViewInfo);
- with ViewInfo do
- begin
- XMax := (x2-x1-1);
- YMax := (y2-y1-1);
- end;
-
- while not KeyPressed do
- begin
- { Plot random pixels }
- RandSeed := Seed;
- I := 0;
- while (not KeyPressed) and (I < NumPts) do
- begin
- Inc(I);
- PutPixel(Random(XMax)+1, Random(YMax)+1, RandColor);
- end;
-
- { Erase pixels }
- RandSeed := Seed;
- I := 0;
- while (not KeyPressed) and (I < NumPts) do
- begin
- Inc(I);
- X := Random(XMax)+1;
- Y := Random(YMax)+1;
- Color := GetPixel(X, Y);
- if Color = RandColor then
- PutPixel(X, Y, 0);
- end;
- end;
- WaitToGo;
- end; { PutPixelPlay }
-
- procedure PutImagePlay;
- { Demonstrate the GetImage and PutImage commands }
-
- const
- r = 20;
- StartX = 100;
- StartY = 50;
-
- var
- CurPort : ViewPortType;
-
- procedure MoveSaucer(var X, Y : integer; Width, Height : integer);
- var
- Step : integer;
- begin
- Step := Random(2*r);
- if Odd(Step) then
- Step := -Step;
- X := X + Step;
- Step := Random(r);
- if Odd(Step) then
- Step := -Step;
- Y := Y + Step;
-
- { Make saucer bounce off viewport walls }
- with CurPort do
- begin
- if (x1 + X + Width - 1 > x2) then
- X := x2-x1 - Width + 1
- else
- if (X < 0) then
- X := 0;
- if (y1 + Y + Height - 1 > y2) then
- Y := y2-y1 - Height + 1
- else
- if (Y < 0) then
- Y := 0;
- end;
- end; { MoveSaucer }
-
- var
- Pausetime : word;
- Saucer : pointer;
- X, Y : integer;
- ulx, uly : word;
- lrx, lry : word;
- Size : word;
- I : word;
- begin
- ClearDevice;
- FullPort;
-
- { PaintScreen }
- ClearDevice;
- MainWindow('GetImage / PutImage Demonstration');
- StatusLine('Esc aborts or press a key...');
- GetViewSettings(CurPort);
-
- { DrawSaucer }
- Ellipse(StartX, StartY, 0, 360, r, (r div 3)+2);
- Ellipse(StartX, StartY-4, 190, 357, r, r div 3);
- Line(StartX+7, StartY-6, StartX+10, StartY-12);
- Circle(StartX+10, StartY-12, 2);
- Line(StartX-7, StartY-6, StartX-10, StartY-12);
- Circle(StartX-10, StartY-12, 2);
- SetFillStyle(SolidFill, MaxColor);
- FloodFill(StartX+1, StartY+4, GetColor);
-
- { ReadSaucerImage }
- ulx := StartX-(r+1);
- uly := StartY-14;
- lrx := StartX+(